home *** CD-ROM | disk | FTP | other *** search
- /*
- Copyright Cornell University 1986. All rights are reserved.
-
- */
-
- /*
- * emdefs.h--contains defines used by em routines
- */
-
-
- #define TRUE (-1)
- #define FALSE 0
-
- #ifndef NULL
- #define NULL 0L
- #endif
-
- #define MAXWIND 50 /* size of the window array */
-
- /* window classes */
- #define EMWINDKIND 9 /* an emulator window */
- #define ICONWINDKIND 10 /* an icon window */
- #define TEXTWINDKIND 11 /* a text window */
- #define HELPWINDKIND 11 /* the help window */
-
- /* connection classes */
- #define CONN_CUTCP 0 /* the default */
- #define CONN_MACTCP 1
- #define CONN_COMMMGR 2
- #define CONN_SERD 3
-
- /* terminal types */
- #define TERM_VT100 0
- #define TERM_3270 1
- #define TERM_H19 2
- #define TERM_VT102 3
- #define TERMTYPECOUNT 4 /* # of terminal types implemented */
- #define TERMTYPEMAX 12 /* # of possible types */
-
- #define TERM_VT220 4 /* unused */
-
- /* program states to which h19 "mode" is set */
- #define NORMMODE 0 /* we are receiving characters to be put on the screen */
- #define ESCMODE 1 /* escape encountered, interpret command */
- #define SETMODES 2 /* set various modes--highlighting etc */
- #define RESETMODES 3 /* reset */
- #define YCALC 4 /* next byte has Y coordinate */
- #define XCALC 5 /* next byte has X coordinate */
- #define CFTMODE 6 /* file transfer initiate negotiations */
- #define CFT2MODE 7 /* in negotiations */
- #define C19FTMODE 8 /* in file transfer mode */
- #define VT100MODE 9 /* act as a vt100 when doing scrolling routines */
-
- /* new mode : for vt100 */
- #define VT_ESC 1 /* last char was an escape */
- #define VT_ANSI 2 /* " bracket */
- #define VT_POUND 3 /* # was seen */
- #define VT_LPAREN 4 /* ( was seen, select alt char set */
- #define VT_RPAREN 5 /* ) was seen, revert char set ? */
- /* skip CFTMODE, CFT2MODE, C19FTMODE */
- #define VT_QMARK 9 /* ? was seen, interpret "DEC private" modes */
- #define VT_VT52 10 /* DEC private vt52 mode */
- #define VT_SPACE 11 /* ' ' was seen... DEC VT200 commands */
-
- /* screen logic */
- #define TOPROW 0
- #define LASTROW 23
- #define LASTCOL 79
- #define TABSIZE 8
-
- #define LINELENGTH (LASTCOL + 1)
- #define MAXLINELENGTH LINELENGTH
- #define SCREENSIZE ((LASTROW + 1) * LINELENGTH)
- #define SIZE23 LASTROW * LINELENGTH
-
- /* screen attributes */
- #define BOLD 0x01
- #define REVERSE 0x02
- #define UNDERSCORE 0x04
- #define BLINK 0x08
-
- #define NORMFONT 0 /* vt100 normal */
- #define VTFONT 0x80 /* vt100 graphics font */
-
- /* screen attribute masks */
- #define NOATTR 0xC0 /* for anding out... */
- #define VTATTR 0x3F /* bottom six bits for attributes */
-
- /* lower level screen constants */
- #define LINEHEIGHT 12 /* the fully-leaded font height */
- #define FONTHEIGHT 11 /* total pixels in font */
- #define FONTSIZE 9 /* # ascending pixels */
- #define FONTDESCENT 2 /* # descending pixels */
- #define FONTWIDTH 6 /* width in pixels */
-
- #define TOPMARG 0 /* we use a 0 based coordinate system */
- #define LEFTMARG 0
- #define BOTTOMMARG 288 /* bottom pixel, height in pixels of screen */
- #define RIGHTMARG 480 /* right hand pixel, width of screen */
-
- #define CURSTOP FONTHEIGHT
- #define CURSBOT 1
-
- #define MRECTTOP FONTHEIGHT - 1
- #define MRECTBOT 2
-
- #define TOPRMARG 438 /* don't allow top controls past this point */
-
- /* defs for screen mapping and redrawing */
-
- #define ASCCHARS 128
- #define SKIPLINES 49 /* was 52--no. of scan lines to skip at top */
- #define NOATTRS 16
-
- #define MAXARGS 10 /* vt100 maximum # of args */
-
-
- /* cursor seeking logic */
-
- #define CURNORMMODE 0 /* mousing-cursor uses standard escape sequences to communicate with host */
- #define CURVIMODE 1 /* mousing-cursor sends UNIX vi codes to move host cursor 40X more economically */
- #define CUREMACSMODE 2 /* haven't found means of doing this with emacs */
-
- /* mask for clrflg & modflg */
- #define SCRALLMOD 0xFFFFFFFF
-
- #define MAXCOLORS 16 /* 16 colors possible */
-
- #define Q1BUTMAX 24 /* Max # of buttons on button bar */
-
- #define MAX_Q 1000 /* queue size for token interpretation */
-
-
-
- typedef struct fonts
- {
- unsigned short *font1;
- unsigned short *font2;
- unsigned short *font3;
- } FONTS;
-
- #define NOCHARS 256 /* number of chars in font */
-
-
- #define LINE25LEN 80
-